home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM A / PD-ROM A.iso / HyperCard / Education / Triangles / card_2661.txt < prev    next >
Encoding:
Text File  |  1991-10-27  |  21.1 KB  |  868 lines

  1. -- card: 2661 from stack: in
  2. -- bmap block id: 3061
  3. -- flags: 4000
  4. -- background id: 3139
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   hide card field 10
  9.   hide card field 11
  10. end opencard
  11.  
  12.  
  13.  
  14. -- part 1 (button)
  15. -- low flags: 00
  16. -- high flags: 2000
  17. -- rect: left=318 top=68 right=101 bottom=374
  18. -- title width / last selected line: 0
  19. -- icon id / first selected line: 0 / 0
  20. -- text alignment: 1
  21. -- font id: 0
  22. -- text size: 12
  23. -- style flags: 0
  24. -- line height: 16
  25. -- part name: BC
  26. ----- HyperTalk script -----
  27. on mouseUp
  28.   get card field 1
  29.   Ask "Enter side BC" with it
  30.   put it into card field 1
  31. end mouseUp
  32.  
  33.  
  34.  
  35. -- part 2 (button)
  36. -- low flags: 00
  37. -- high flags: 2000
  38. -- rect: left=408 top=75 right=101 bottom=435
  39. -- title width / last selected line: 0
  40. -- icon id / first selected line: 0 / 0
  41. -- text alignment: 1
  42. -- font id: 0
  43. -- text size: 12
  44. -- style flags: 0
  45. -- line height: 16
  46. -- part name: b
  47. ----- HyperTalk script -----
  48. on mouseUp
  49.   get card field 2
  50.   Ask "Enter side CA" with it
  51.   put it into card field 2
  52. end mouseUp
  53.  
  54.  
  55.  
  56.  
  57. -- part 3 (button)
  58. -- low flags: 00
  59. -- high flags: 2000
  60. -- rect: left=315 top=104 right=127 bottom=402
  61. -- title width / last selected line: 0
  62. -- icon id / first selected line: 0 / 0
  63. -- text alignment: 1
  64. -- font id: 0
  65. -- text size: 12
  66. -- style flags: 0
  67. -- line height: 16
  68. -- part name: AB
  69. ----- HyperTalk script -----
  70. on mouseUp
  71.   get card field 3
  72.   Ask "Enter side c" with it
  73.   put it into card field 3
  74. end mouseUp
  75.  
  76.  
  77.  
  78. -- part 6 (button)
  79. -- low flags: 00
  80. -- high flags: 2000
  81. -- rect: left=411 top=103 right=132 bottom=448
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 0 / 0
  84. -- text alignment: 1
  85. -- font id: 0
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: °A
  90. ----- HyperTalk script -----
  91. on mouseUp
  92.   get card field 4
  93.   show card field 10
  94.   Ask "Enter Angle or Coordinates (see note above)" with it
  95.   hide card field 10
  96.   put it into card field 4
  97. end mouseUp
  98.  
  99.  
  100.  
  101. -- part 4 (button)
  102. -- low flags: 00
  103. -- high flags: 2000
  104. -- rect: left=263 top=102 right=129 bottom=313
  105. -- title width / last selected line: 0
  106. -- icon id / first selected line: 0 / 0
  107. -- text alignment: 1
  108. -- font id: 0
  109. -- text size: 12
  110. -- style flags: 0
  111. -- line height: 16
  112. -- part name: °B
  113. ----- HyperTalk script -----
  114. on mouseUp
  115.   get card field 5
  116.   show card field 10
  117.   Ask "Enter Angle or Coordinates (see note above)" with it
  118.   hide card field 10
  119.   put it into card field 5
  120. end mouseUp
  121.  
  122.  
  123.  
  124. -- part 5 (button)
  125. -- low flags: 00
  126. -- high flags: 2000
  127. -- rect: left=374 top=49 right=77 bottom=410
  128. -- title width / last selected line: 0
  129. -- icon id / first selected line: 0 / 0
  130. -- text alignment: 1
  131. -- font id: 0
  132. -- text size: 12
  133. -- style flags: 0
  134. -- line height: 16
  135. -- part name: °C
  136. ----- HyperTalk script -----
  137. on mouseUp
  138.   get card field 6
  139.   show card field 10
  140.   Ask "Enter Angle or Coordinates (see note above)" with it
  141.   hide card field 10
  142.   put it into card field 6
  143. end mouseUp
  144.  
  145.  
  146.  
  147. -- part 7 (field)
  148. -- low flags: 01
  149. -- high flags: 0000
  150. -- rect: left=346 top=84 right=96 bottom=396
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 0 / 0
  153. -- text alignment: 0
  154. -- font id: 3
  155. -- text size: 9
  156. -- style flags: 0
  157. -- line height: 12
  158. -- part name: 
  159.  
  160.  
  161. -- part 8 (field)
  162. -- low flags: 01
  163. -- high flags: 0000
  164. -- rect: left=426 top=84 right=97 bottom=498
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 0
  168. -- font id: 3
  169. -- text size: 9
  170. -- style flags: 0
  171. -- line height: 12
  172. -- part name: 
  173.  
  174.  
  175. -- part 9 (field)
  176. -- low flags: 01
  177. -- high flags: 0000
  178. -- rect: left=354 top=125 right=137 bottom=406
  179. -- title width / last selected line: 0
  180. -- icon id / first selected line: 0 / 0
  181. -- text alignment: 0
  182. -- font id: 3
  183. -- text size: 9
  184. -- style flags: 0
  185. -- line height: 12
  186. -- part name: 
  187.  
  188.  
  189. -- part 10 (field)
  190. -- low flags: 01
  191. -- high flags: 0000
  192. -- rect: left=431 top=104 right=117 bottom=512
  193. -- title width / last selected line: 0
  194. -- icon id / first selected line: 0 / 0
  195. -- text alignment: 0
  196. -- font id: 3
  197. -- text size: 9
  198. -- style flags: 0
  199. -- line height: 12
  200. -- part name: 
  201.  
  202.  
  203. -- part 11 (field)
  204. -- low flags: 01
  205. -- high flags: 0000
  206. -- rect: left=312 top=104 right=116 bottom=413
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 0
  210. -- font id: 3
  211. -- text size: 9
  212. -- style flags: 0
  213. -- line height: 12
  214. -- part name: 
  215.  
  216.  
  217. -- part 12 (field)
  218. -- low flags: 01
  219. -- high flags: 0000
  220. -- rect: left=405 top=61 right=75 bottom=512
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 0
  224. -- font id: 3
  225. -- text size: 9
  226. -- style flags: 0
  227. -- line height: 12
  228. -- part name: 
  229.  
  230.  
  231. -- part 13 (button)
  232. -- low flags: 00
  233. -- high flags: A003
  234. -- rect: left=150 top=310 right=334 bottom=339
  235. -- title width / last selected line: 0
  236. -- icon id / first selected line: 0 / 0
  237. -- text alignment: 1
  238. -- font id: 0
  239. -- text size: 12
  240. -- style flags: 0
  241. -- line height: 16
  242. -- part name: Calculate
  243. ----- HyperTalk script -----
  244. on mouseUp
  245.   global ii,sa,sb,sc,aa,ab,ac,cc,ms
  246.   put 0 into cc
  247.   put empty into ms
  248.   set cursor to 4
  249.   repeat with x=1 to 6
  250.     if offset(",",card field x)>0 then put 1 into cc
  251.     if card field x=0 then put "Error... Cannot accept zero entries" into ms
  252.   end repeat
  253.   if ms is not empty then
  254.     mss
  255.     exit mouseup
  256.   end if
  257.   if cc=1 then coordinate
  258.   if cc=6 then exit mouseup
  259.   if cc>1 then
  260.     if cc=2 then put "Error ...entries of Sides are not allowed when you choose Coordinates" into ms
  261.     if cc=3 then put "Error ... Not enough data" into ms
  262.     if cc=4 then put "Error ... Some Coordinates have wrong Format" into ms
  263.     if cc=5 then put "Error... These values do not give a real solution" into ms
  264.     mss
  265.     exit mouseup
  266.   end if
  267.  
  268.   put card field 1 into sa
  269.   put card field 2 into sb
  270.   put card field 3 into sc
  271.   put card field 4 into aa
  272.   put card field 5 into ab
  273.   put card field 6 into ac
  274.   if sa is empty then put 0 into sa
  275.   if sb is empty then put 0 into sb
  276.   if sc is empty then put 0 into sc
  277.   if aa is empty then put 0 into aa
  278.   if ab is empty then put 0 into ab
  279.   if ac is empty then put 0 into ac
  280.   if offset("-",sa&sb&sc&aa&ab&ac)<>0 then put "Error ... cannot accept negative entries" into ms
  281.   if aa+ab+ac>180 then put "Error .. Angles are more than 180¬∞" into ms
  282.   if ms is not empty then
  283.     mss
  284.     exit mouseup
  285.   end if
  286.  
  287.   put 0 into ii
  288.   if aa>0 and ab>0 and ac=0 then put 180-aa-ab into ac
  289.   if ab>0 and ac>0 and aa=0 then put 180-ab-ac into aa
  290.   if aa>0 and ac>0 and ab=0 then put 180-aa-ac into ab
  291.   if abs(aa)>0 and abs(ab)>0 and abs(ac)>0 then
  292.     if abs(aa)+abs(ab)+abs(ac)<>180 or offset("-",aa&ab&ac)<>0 then put "Error... Angles do not add up to 180¬∞" into ms
  293.     put 1 into ii
  294.     if sa=0 and sb=0 and sc>0 then put 2 into ii
  295.     if sa=0 and sc=0 and sb>0 then put 2 into ii
  296.     if sb=0 and sc=0 and sa>0 then put 2 into ii
  297.     if sa=0 and sb=0 and sc=0 then put 2 into ii
  298.   end if
  299.   if ms is empty and ii=1 then put "Too Many Data Elements!" into ms
  300.   if ms is not empty then
  301.     mss
  302.     exit mouseup
  303.   end if
  304.   if ii=2 and ms is empty then
  305.     calculate
  306.     exit mouseup
  307.   end if
  308.   put 0 into count
  309.   if sa=0 then add 1 to count
  310.   if sb=0 then add 1 to count
  311.   if sc=0 then add 1 to count
  312.   if aa=0 then add 1 to count
  313.   if ab=0 then add 1 to count
  314.   if ac=0 then add 1 to count
  315.   if (ab>0 and ac>0) or (ab>0 and aa>0) or (ac>0 and aa>0) then put "This is a straight line !" into ms
  316.   if ms is empty and count >3 then put "Error... Not enough Data !" into ms
  317.   if ms is empty and count <3 then put "Error... Too Many Data Elements!" into ms
  318.   if ms is not empty then
  319.     mss
  320.     exit mouseup
  321.   end if
  322.   calculate
  323.   set cursor to 1
  324. end mouseUp
  325.  
  326. on coordinate          --  ****  --
  327.   global cc,ms
  328.   put empty into ms
  329.   repeat with x=1 to 3
  330.     if card field x is not empty then put 2 into cc
  331.   end repeat
  332.   if cc=2 then exit coordinate
  333.   put 0 into j
  334.   repeat with x=4 to 6
  335.     if card field x is empty then add 1 to j
  336.   end repeat
  337.   if j>1 then
  338.     put 3 into cc
  339.     exit coordinate
  340.   end if
  341.   put item 1 of card field 4 into xh
  342.   put item 2 of card field 4 into xv
  343.   put item 1 of card field 5 into yh
  344.   put item 2 of card field 5 into yv
  345.   put item 1 of card field 6 into zh
  346.   put item 2 of card field 6 into zv
  347.  
  348.   if (card field 4 is not empty and offset(",",card field 4)=0) or (card field 5 is not empty and offset(",",card field 5)=0) or (card field 6 is not empty and offset(",",card field 6)=0) then
  349.     put 4 into cc
  350.     exit coordinate
  351.   end if
  352.   put empty into card field 12
  353.   put empty into card field 7
  354.   put empty into card field 8
  355.   if card field 4 is empty or card field 5 is empty or card field 6 is empty then
  356.     put 0 into h
  357.     put 0 into v
  358.     if card field 4 is not empty and card field 5 is not empty and card field 6 is empty then
  359.       if xh=yh then put 1 into v
  360.       if xv=yv then put 1 into h
  361.       if xv>=yv then
  362.         put xv into cv
  363.         put xh into ch
  364.         put yv into av
  365.         put yh into ah
  366.       else
  367.         put xv into av
  368.         put xh into ah
  369.         put yv into cv
  370.         put yh into ch
  371.       end if
  372.     end if
  373.     if card field 4 is not empty and card field 6 is not empty and card field 5 is empty then
  374.       if xh=zh then put 1 into v
  375.       if xv=zv then put 1 into h
  376.       if xv>=zv then
  377.         put xv into cv
  378.         put xh into ch
  379.         put zv into av
  380.         put zh into ah
  381.       else
  382.         put xv into av
  383.         put xh into ah
  384.         put zv into cv
  385.         put zh into ch
  386.       end if
  387.     end if
  388.     if card field 6 is not empty and card field 5 is not empty and card field 4 is empty then
  389.       if zh=yh then put 1 into v
  390.       if zv=yv then put 1 into h
  391.       if zv>=yv then
  392.         put zv into cv
  393.         put zh into ch
  394.         put yv into av
  395.         put yh into ah
  396.       else
  397.         put zv into av
  398.         put zh into ah
  399.         put yv into cv
  400.         put yh into ch
  401.       end if
  402.     end if
  403.     put sqrt(((ch-ah)^2)+((cv-av)^2)) into len
  404.     if h =1 then
  405.       if ch>ah then
  406.         put ch into tah
  407.         put ah into ch
  408.         put tah into ah
  409.       end if
  410.       put 0 into tch
  411.       put 205 into tah
  412.       put 1 into tav
  413.       put 1 into tcv
  414.       put 0 into ang
  415.     end if
  416.     if v =1 then
  417.       if cv>av then
  418.         put cv into tah
  419.         put av into cv
  420.         put tah into av
  421.       end if
  422.       put 2 into tah
  423.       put 2 into tch
  424.       put 0 into tcv
  425.       put 205 into tav
  426.       put 90 into ang
  427.     end if
  428.     if h=0 and v=0 then
  429.       put min(ch,ah) into minh
  430.       put min(cv,av) into minv
  431.       put abs(ch-ah) into maxh
  432.       put abs(cv-av) into maxv
  433.       put max(maxh,maxv) into max
  434.       put 190/max into ratio
  435.       put round(ratio*(ch-minh)) into tch
  436.       put round(ratio*(cv-minv)) into tcv
  437.       put round(ratio*(ah-minh)) into tah
  438.       put round(ratio*(av-minv)) into tav
  439.       put (180/pi)*atan((cv-av)/(ch-ah)) into ang
  440.       if ang<0 then add 180 to ang
  441.     end if
  442.     if offset("N",ang&len) <>0 then
  443.       put 5 into cc
  444.       exit coordinate
  445.     end if
  446.     set numberformat to "0.0000"
  447.     put "Distance between the two points =" into line 2 of card field 12
  448.     put len into line 5 of card field 7
  449.     put "Angle with the Horizontal Axis =" into line 4 of card field 12
  450.     put ang&"¬∞" into line 10 of card field 7
  451.     Choose select tool
  452.     Drag from 17,50 to 253,302
  453.     domenu clear picture
  454.     if len=0 then
  455.       choose text tool
  456.       click at 130,170
  457.       type "‚Ä¢"&&" ("&ch&","&cv&")"
  458.       put empty into line 5 of card field 7
  459.       put 6 into cc
  460.       choose browse tool
  461.       exit coordinate
  462.     end if
  463.     choose line tool
  464.     set linesize to 1
  465.     drag from 25,285 to 250,285
  466.     drag from  35,295 to 35,55
  467.     set linesize to 2
  468.     put 35+tch into locc
  469.     put 35+tah into loca
  470.     drag from locc,285-tcv to loca,285-tav
  471.     choose text tool
  472.     set textfont to geneva
  473.     set textsize to 9
  474.     put round(5.5*(1+(length(ch)+length(cv)))) into textc
  475.     put round(5.5*(1+(length(ah)+length(av)))) into texta
  476.     if locc+textc >250 then put 240-textc into locc
  477.     if loca+texta >240 then put 240-texta into loca
  478.     click at locc+8,281-tcv
  479.     type ch&","&cv
  480.     click at loca+8,281-tav
  481.     type ah&","&av
  482.  
  483.   else
  484.  
  485.     put max(xh,yh,zh) into maxh
  486.     put min(xh,yh,zh) into minh
  487.     put min(xv,yv,zv) into minv
  488.  
  489.     if xv>=yv and xv>=zv then
  490.       put xv into cv
  491.       put xh into ch
  492.       if yh>=zh then
  493.         put yh into ah
  494.         put yv into av
  495.         put zh into bh
  496.         put zv into bv
  497.       else
  498.         put zh into ah
  499.         put zv into av
  500.         put yh into bh
  501.         put yv into bv
  502.       end if
  503.     end if
  504.     if yv>=xv and yv>=zv then
  505.       put yv into cv
  506.       put yh into ch
  507.       if xh>=zh then
  508.         put xh into ah
  509.         put xv into av
  510.         put zh into bh
  511.         put zv into bv
  512.       else
  513.         put zh into ah
  514.         put zv into av
  515.         put xh into bh
  516.         put xv into bv
  517.       end if
  518.     end if
  519.     if zv>=xv and zv>=yv then
  520.       put zv into cv
  521.       put zh into ch
  522.       if yh>=xh then
  523.         put yh into ah
  524.         put yv into av
  525.         put xh into bh
  526.         put xv into bv
  527.       else
  528.         put xh into ah
  529.         put xv into av
  530.         put yh into bh
  531.         put yv into bv
  532.       end if
  533.     end if
  534.  
  535.     put cv into maxv
  536.  
  537.     if maxv-minv>=maxh-minh then put maxv-minv into max
  538.     if maxv-minv<maxh-minh then put maxh-minh into max
  539.  
  540.     put sqrt(((ah-bh)^2)+((av-bv)^2)) into sc
  541.     put sqrt(((ch-ah)^2)+((cv-av)^2)) into sb
  542.     put sqrt(((ch-bh)^2)+((cv-bv)^2)) into sa
  543.  
  544.  
  545.     put ((sb^2)+(sc^2)-(sa^2))/(2*sb*sc) into cosa
  546.     put sqrt(1-cosa^2) into sina
  547.     put (180/pi)*atan(sina/cosa) into aa
  548.     if aa<0 then put 180+aa into aa
  549.     put ((sa^2)+(sc^2)-(sb^2))/(2*sa*sc) into cosb
  550.     put sqrt(1-cosb^2) into sinb
  551.     put (180/pi)*atan(sinb/cosb) into ab
  552.     if ab<0 then put 180+ab into ab
  553.     put 180-aa-ab into ac
  554.     put (sa+sb+sc)/2 into s
  555.     put sqrt(s*(s-sa)*(s-sb)*(s-sc)) into area
  556.     set numberformat to "0.0000"
  557.     put "angle A'=" into line 2 of card field 12
  558.     put 1*aa&"¬∞" into line 2 of card field 7
  559.     put "angle B'=" into line 3 of card field 12
  560.     put 1*ab&"¬∞" into line 3 of card field 7
  561.     put "angle C'=" into line 4 of card field 12
  562.     put 1*ac&"¬∞" into line 4 of card field 7
  563.     put "side A'B'=" into line 6 of card field 12
  564.     put 1*sc into line 6 of card field 7
  565.     put "side B'C'=" into line 7 of card field 12
  566.     put 1*sa into line 7 of card field 7
  567.     put "side C'A'=" into line 8 of card field 12
  568.     put 1*sb into line 8 of card field 7
  569.     put "Area     =" into line 10 of card field 12
  570.     put area into line 10 of card field 7
  571.     if offset("N",sa&sb&sc&aa&ab&ac)<>0 or min(sa,sb,sc,aa,ab,ac)<0 then
  572.       put 5 into cc
  573.       exit coordinate
  574.     end if
  575.  
  576.     put 210/max into ratio
  577.     Choose select tool
  578.     Drag from 17,50 to 253,302
  579.     domenu clear picture
  580.     choose line tool
  581.     set linesize to 2
  582.     drag from 35+round(ratio*(ch-minh)),285-round(ratio*(cv-minv)) to 35+round(ratio*(bh-minh)),285-round(ratio*(bv-minv))
  583.     drag from 35+round(ratio*(bh-minh)),285-round(ratio*(bv-minv)) to 35+round(ratio*(ah-minh)),285-round(ratio*(av-minv))
  584.     drag from 35+round(ratio*(ah-minh)),285-round(ratio*(av-minv)) to 35+round(ratio*(ch-minh)),285-round(ratio*(cv-minv))
  585.     choose text tool
  586.     set textfont to geneva
  587.     set textsize to 9
  588.     put 35+round(ratio*(ch-minh)) into locc
  589.     put 35+round(ratio*(bh-minh))into locb
  590.     put 45+round(ratio*(ah-minh)) into loca
  591.     put round(6.5*(3+(length(ch)+length(cv)))) into textc
  592.     put round(6.5*(3+(length(bh)+length(bv)))) into textb
  593.     put round(6.5*(3+(length(ah)+length(av)))) into texta
  594.     if locc+textc >250 then put 240-textc into locc
  595.     if locb+textb >250 then put 240-textb into locb
  596.     if loca+texta >240 then put 240-texta into loca
  597.     click at locc,275-round(ratio*(cv-minv))
  598.     type "C' ("&ch&","&cv&")"
  599.     click at locb,298-round(ratio*(bv-minv))
  600.     type "B' ("&bh&","&bv&")"
  601.     click at loca,281-round(ratio*(av-minv))
  602.     type "A' ("&ah&","&av&")"
  603.   end if
  604.   choose browse tool
  605.   put 6 into cc
  606.   set cursor to 1
  607. end coordinate
  608.  
  609. on mss
  610.   global ms
  611.   play "Boing"
  612.   put ms into the message box
  613.   wait 80
  614.   hide message box
  615.   set cursor to 1
  616. end mss
  617.  
  618.  
  619.  
  620.  
  621. -- part 15 (button)
  622. -- low flags: 00
  623. -- high flags: A003
  624. -- rect: left=11 top=311 right=333 bottom=95
  625. -- title width / last selected line: 0
  626. -- icon id / first selected line: 0 / 0
  627. -- text alignment: 1
  628. -- font id: 0
  629. -- text size: 12
  630. -- style flags: 0
  631. -- line height: 16
  632. -- part name: Formulas...
  633. ----- HyperTalk script -----
  634. on mouseUp
  635.   go card 3
  636. end mouseUp
  637.  
  638.  
  639.  
  640. -- part 17 (field)
  641. -- low flags: 01
  642. -- high flags: 0000
  643. -- rect: left=338 top=144 right=306 bottom=419
  644. -- title width / last selected line: 0
  645. -- icon id / first selected line: 0 / 0
  646. -- text alignment: 65535
  647. -- font id: 0
  648. -- text size: 12
  649. -- style flags: 0
  650. -- line height: 16
  651. -- part name: 
  652.  
  653.  
  654. -- part 19 (field)
  655. -- low flags: 01
  656. -- high flags: 0000
  657. -- rect: left=418 top=144 right=304 bottom=498
  658. -- title width / last selected line: 0
  659. -- icon id / first selected line: 0 / 0
  660. -- text alignment: 65535
  661. -- font id: 3
  662. -- text size: 12
  663. -- style flags: 0
  664. -- line height: 16
  665. -- part name: 
  666.  
  667.  
  668. -- part 20 (field)
  669. -- low flags: 01
  670. -- high flags: 0000
  671. -- rect: left=277 top=4 right=16 bottom=289
  672. -- title width / last selected line: 0
  673. -- icon id / first selected line: 0 / 0
  674. -- text alignment: 0
  675. -- font id: 3
  676. -- text size: 9
  677. -- style flags: 0
  678. -- line height: 12
  679. -- part name: 
  680.  
  681.  
  682. -- part 21 (button)
  683. -- low flags: 00
  684. -- high flags: 2000
  685. -- rect: left=415 top=25 right=46 bottom=437
  686. -- title width / last selected line: 0
  687. -- icon id / first selected line: 19678 / 19678
  688. -- text alignment: 1
  689. -- font id: 0
  690. -- text size: 12
  691. -- style flags: 0
  692. -- line height: 16
  693. -- part name: New Button
  694. ----- HyperTalk script -----
  695. on mouseUp
  696.   if visible of card field 11 then hide card field 11
  697.   else show card field 11
  698. end mouseUp
  699.  
  700.  
  701.  
  702. -- part 23 (field)
  703. -- low flags: 81
  704. -- high flags: 0004
  705. -- rect: left=48 top=71 right=101 bottom=471
  706. -- title width / last selected line: 0
  707. -- icon id / first selected line: 0 / 0
  708. -- text alignment: 0
  709. -- font id: 3
  710. -- text size: 10
  711. -- style flags: 0
  712. -- line height: 13
  713. -- part name: 
  714.  
  715.  
  716. -- part 33 (button)
  717. -- low flags: 00
  718. -- high flags: A003
  719. -- rect: left=196 top=25 right=42 bottom=242
  720. -- title width / last selected line: 0
  721. -- icon id / first selected line: 0 / 0
  722. -- text alignment: 1
  723. -- font id: 0
  724. -- text size: 12
  725. -- style flags: 0
  726. -- line height: 16
  727. -- part name: Reset
  728. ----- HyperTalk script -----
  729. on mouseUp
  730.   Answer "use Reset only to re-draw jumbled screen!" with "Cancel" or "OK"
  731.   if it is "cancel" then exit mouseup
  732.   if it is "OK" then
  733.     get the id of this card
  734.     if it is "card id 2661" then
  735.       play "boing"
  736.       put "You cannot re-draw the Sample Card. Use Reset from the 1st card" into message box
  737.       exit mouseup
  738.     end if
  739.     set lockscreen to true
  740.     set cursor to 4
  741.     go card id 2661
  742.     domenu copy card
  743.     go card 2
  744.     domenu paste card
  745.     click at loc of card field 13
  746.     select card field 13
  747.     domenu cut field
  748.     choose browse tool
  749.     go prev
  750.     set cantdelete of this card to false
  751.     domenu delete card
  752.     set lockscreen to false
  753.     set cursor to 1
  754.   end if
  755. end mouseUp
  756.  
  757.  
  758.  
  759. -- part 34 (button)
  760. -- low flags: 00
  761. -- high flags: 2000
  762. -- rect: left=447 top=304 right=342 bottom=491
  763. -- title width / last selected line: 0
  764. -- icon id / first selected line: 29114 / 29114
  765. -- text alignment: 1
  766. -- font id: 0
  767. -- text size: 12
  768. -- style flags: 0
  769. -- line height: 16
  770. -- part name: back to index
  771. ----- HyperTalk script -----
  772. on mouseUp
  773.   go card 1
  774. end mouseup
  775.  
  776.  
  777. -- part 35 (button)
  778. -- low flags: 00
  779. -- high flags: A003
  780. -- rect: left=265 top=52 right=69 bottom=312
  781. -- title width / last selected line: 0
  782. -- icon id / first selected line: 0 / 0
  783. -- text alignment: 1
  784. -- font id: 0
  785. -- text size: 12
  786. -- style flags: 0
  787. -- line height: 16
  788. -- part name: Clear
  789. ----- HyperTalk script -----
  790. on mouseUp
  791.   reset
  792. end mouseUp
  793.  
  794.  
  795.  
  796. -- part 37 (field)
  797. -- low flags: 81
  798. -- high flags: 0004
  799. -- rect: left=251 top=50 right=331 bottom=510
  800. -- title width / last selected line: 0
  801. -- icon id / first selected line: 0 / 0
  802. -- text alignment: 0
  803. -- font id: 3
  804. -- text size: 12
  805. -- style flags: 0
  806. -- line height: 16
  807. -- part name: 
  808. ----- HyperTalk script -----
  809. on mouseup
  810.   hide card field 11
  811. end mouseup
  812.  
  813.  
  814. -- part 38 (field)
  815. -- low flags: 01
  816. -- high flags: 0000
  817. -- rect: left=264 top=145 right=304 bottom=337
  818. -- title width / last selected line: 0
  819. -- icon id / first selected line: 0 / 0
  820. -- text alignment: 0
  821. -- font id: 0
  822. -- text size: 12
  823. -- style flags: 0
  824. -- line height: 16
  825. -- part name: 
  826.  
  827.  
  828. -- part 29 (field)
  829. -- low flags: 01
  830. -- high flags: 0004
  831. -- rect: left=80 top=146 right=197 bottom=372
  832. -- title width / last selected line: 0
  833. -- icon id / first selected line: 0 / 0
  834. -- text alignment: 0
  835. -- font id: 3
  836. -- text size: 18
  837. -- style flags: 256
  838. -- line height: 24
  839. -- part name: 
  840.  
  841.  
  842. -- part contents for card part 23
  843. ----- text -----
  844. For Angles,  just enter the value (i.e.  45)
  845. For Coordinates, enter the two coordinates separated by a "comma" (i.e.  981,762)
  846.  
  847. -- part contents for card part 29
  848. ----- text -----
  849. This is a Sample Card used 
  850. for Re-Drawing the Screen
  851.  
  852. -- part contents for card part 37
  853. ----- text -----
  854. To enter data, click on the angle
  855. or line in the "Input" part of the screen, and enter your values. Then click on the "Calculate" button to see the results 
  856. displayed in The "Output" part of the screen.
  857.  
  858. Note:
  859.    Angle entries can be either in
  860.    degrees or as coordinate of
  861.    a point. Just enter the number
  862.    if it is in degrees. If it is
  863.    entered as coordinate then  2
  864.    numbers separated by a comma 
  865.    must be  entered. You cannot
  866.    enter sides if you are working 
  867.    with coordinates.
  868.